import { legacy_createStore, applyMiddleware } from "redux";
import reducer from "./reducer";

// redux-thunk是一个redux的异步库
import thunk from "redux-thunk";

// applyMiddleware表示中间件，中间件的目的是增加dispatch的功能
// 如果要做异步，需要第二个参数
const store = legacy_createStore(reducer, applyMiddleware(thunk));
export default store;
